package material.strategy;

/**
 * 运行主类
 */
public class MainClass {
    public static void main(String[] args) {
//        Duck yellowDuck = new YellowDuck();
//        yellowDuck.display();
//        yellowDuck.performFly();
//        yellowDuck.performQuack();
        Duck model=new ModelDuck();
        model.display();
        model.performFly();
        //接下来动态的设定火箭动力
        model.setFlyBeahavior(new FlyRocketPowered());
        model.performFly();
    }
}
